package com.cloudxingkong.dianyinke.Student.Utils;


import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by ningfei on 2016/3/19.
 * 课程预约-老师资料
 */
public class JsonUtils  {
    public static List<HashMap<String,Object>> getDataFormJson(String json){
        List<HashMap<String,Object>> data;
        try {
            data=new ArrayList<>();
            JSONObject object=new JSONObject(json);
            HashMap<String,Object> map=new HashMap<>();
            map.put("exp",object.getString("experience"));
            map.put("honor",object.getString("honor"));
            map.put("work",object.getString("work"));
            data.add(map);
            return data;

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }
}
